home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / math / gle-3.000 / gle-3 / gle / varargs.c < prev    next >
C/C++ Source or Header  |  1995-02-07  |  1KB  |  68 lines

  1. /* As varargs are so difficult to make work, I've put them
  2.    in this module by themselfs,  on a DEC5400 it was necessary
  3.    to compile this module using the native C compiler instead of
  4.    GCC
  5. */
  6.  
  7.  
  8.  
  9. #include <varargs.h>
  10.  
  11. #ifndef MANIP
  12. void gprint(va_alist)
  13. va_dcl
  14. {
  15.         va_list args;
  16.         char *fmt;
  17.         char string[1024];
  18.  
  19.         va_start(args);
  20.         fmt = va_arg(args, char *);
  21.         vsprintf(string, fmt, args);
  22.         va_end(args);
  23.     gprint_do(string);
  24. }
  25. #else
  26. void fner(va_alist)
  27. va_dcl
  28. {
  29.         va_list args;
  30.         char *fmt;
  31.         char string[1024];
  32.  
  33.         va_start(args);
  34.         fmt = va_arg(args, char *);
  35.         vsprintf(string, fmt, args);
  36.         va_end(args);
  37.     fner_do(string);
  38. }
  39.  
  40. void printmess(va_alist)
  41. va_dcl
  42. {
  43.         va_list args;
  44.         char *fmt;
  45.         char string[1024];
  46.  
  47.         va_start(args);
  48.         fmt = va_arg(args, char *);
  49.         vsprintf(string, fmt, args);
  50.         va_end(args);
  51.     printmess_do(string);
  52. }
  53. #endif
  54. void wprintf(va_alist)
  55. va_dcl
  56. {
  57.         va_list args;
  58.         char *fmt;
  59.         char string[1024];
  60.  
  61.         va_start(args);
  62.         fmt = va_arg(args, char *);
  63.         vsprintf(string, fmt, args);
  64.         va_end(args);
  65.     wprintf_do(string);
  66. }
  67.  
  68.